#ifndef SIMULATOR_MODULE
#define SIMULATOR_MODULE

#include <WinSock2.h>
#include <stdio.h>
#include "Types.h"

/*
 * Function Name
 * =========================
 * This Module represents the real world, it is a server for the interceptors
 * and iron dome manger and a client of the clock.after connecting to all the interceptors and the manager 
 * and finishshing the startup sequance. Each turn the Simulator:
 * Calculates the velocity and position of all rockets and the position of all interceptors.
 * Checks if there were any interceptions or if any rockets hit the ground.
 * Decide based on a "random seeded" calculation if a new rocket has been launched.
 * Informs all active interceptors about their location (simulating a G.P.S) or if they tried to intercept.
 * Sends a list of all flying rockets to the IronDomeManager and wait to receive information
 * from flying and launched interceptors.
 * Each turn this module will update the IronDomeOutput text file.
 *
 * Arguments: argc-	The number of input arguments received
 * 			  argv- The arguments, passed on from the "main" function. See a specific list of arguments below.
 *
 * List of arguments the battery expects in argv:	
 *
 *		Mode Name: A string containing the name of the mode
 *		Self i.p: A string of the i.p address of the process 
 *		Self Port: An integer representing the port number of the process 
 *		Clock i.p: A string of the i.p address of the Clock Module 
 *		Clock port: An integer representing the port number of the Clock Module
 *		Iron Dome Manager i.p: A string representing the i.p address of the Iron Dome Manager.
 *		Iron Dome Manager Port: An integer representing Iron Dome Manager Port number.
 *		Min X: A double representing the minimum X position possible. 
 *		Max X: A double representing the maximum X position possible. 
 *		Min Y: A double representing the minimum Y position possible.
 *		Max Y  A double representing the maximum Y position possible.
 *		Min T: Integer representing the minimum life time for a launched Rocket.
 *		Max T: Integer representing the maximum life time for a launched Rocket.
 *		Min Theta: Double representing the minimum advancement angle for Rockets.
 *		Max Theta: Double representing the maximum advancement angle for Rockets.
 *		Min V: Double representing the minimum Rocket speed.
 *		Max V: Double representing the maximum Rocket speed.
 *		Launch Probability: A double representing the probability to launch a Rocket.
 *		Standard Deviation Velocity: A double representing the standard deviation of the relative Velocity Error.  
 *		Standard Deviation Position:  A double representing the standard deviation of the relative Position Error.
 *		N: An integer representing the number of rocket to be launched in the simulation.
 *		Seed (optional) : An unsigned integer representing a source for the probability errors.
 *
 * Return Value: None
 */

void MainSimulator(int argc, char *argv[]);

#endif

